#pragma once
#include <stdint.h>

class Bytes{
    public:
        typedef enum{
            LittleEnd,
            BigEnd,
        }DataTyep_t;
        Bytes();
        void frome_u32(uint32_t value, DataTyep_t type = LittleEnd);
        void frome_u16(uint16_t value, DataTyep_t type = LittleEnd);
        void frome_u8(uint8_t value, DataTyep_t type = LittleEnd);
        uint32_t to_u32(uint8_t* bytes, DataTyep_t type = LittleEnd);
        uint16_t to_u16(uint8_t* bytes, DataTyep_t type = LittleEnd);
        int32_t to_i32(uint8_t* bytes, DataTyep_t type = LittleEnd);
        int16_t to_i16(uint8_t* bytes, DataTyep_t type = LittleEnd);
        float to_float(uint8_t* bytes, DataTyep_t type = LittleEnd);
        ~Bytes();
        uint8_t* bytes;
        uint8_t length;
};
